﻿Imports GT = Gadgeteer
Imports GTM = Gadgeteer.Modules
Imports Gadgeteer.Modules.GHIElectronics


Namespace Drawing___Graph
    Partial Public Class Program
        Dim random As New Random
        Dim length As Integer = 10
        Dim maxRadius As Integer = 50
        Dim radius(length) As Integer
        Dim xValues(length) As Integer
        Dim yvalues(length) As Integer


        ' This is run when the mainboard is powered up or reset. 
        Public Sub ProgramStarted()
            '*******************************************************************************************
            ' Hardware modules added in the Program.gadgeteer designer view are used by typing 
            ' their name followed by a period, e.g.  button.  or  camera.
            '
            ' Many hardware modules generate useful events. To set up actions for those events, use the 
            ' left dropdown box at the top of this code editing window to choose a hardware module, then
            ' use the right dropdown box to choose the event - an event handler will be auto-generated.
            '*******************************************************************************************/

            ' Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started")

            'generate the random values
            For count = 1 To length
                radius(count) = random.Next(maxRadius)
                xValues(count) = random.Next(display.Width)
                yvalues(count) = random.Next(display.Height)
                'draw the circles
                display.SimpleGraphics.DisplayEllipse(GT.Color.Red, xValues(count), yvalues(count), radius(count), radius(count))

            Next




        End Sub



    End Class
End Namespace